package com.jltx.xq.simplewatch.utils;

import com.jltx.xq.simplewatch.news.model.bean.TopicNews;
import com.jltx.xq.simplewatch.news.model.bean.WeChatNews;

/**
 * @author jltxseo
 * @date 2017/09/27.
 * @description:
 */

public class NewsStateUtils {

    public static String convertWetChatNewsStateKey(WeChatNews weChatNews) {
        if (weChatNews != null) {
            return weChatNews.getUrl();
        }
        return null;
    }


    public static String convertTopicNewsStateKey(TopicNews topicNews) {
        if (topicNews != null) {
            return topicNews.getItem_id() + "/" + topicNews.getGroup_id() + "/" + topicNews.getUrl(); //key的规则:item_id/group_id/url
        }
        return null;
    }

}
